Skip to content

feat(deno): add express integration#22461

Open
isaacs wants to merge 1 commit into
isaacs/deno-orchestrion-integrations-lrumemoizerfrom
isaacs/deno-orchestrion-integrations-express
Open

feat(deno): add express integration#22461
isaacs wants to merge 1 commit into
isaacs/deno-orchestrion-integrations-lrumemoizerfrom
isaacs/deno-orchestrion-integrations-express

Conversation

@isaacs

@isaacs isaacs commented Jul 21, 2026

Copy link
Copy Markdown
Member

No description provided.

@isaacs
isaacs requested a review from a team as a code owner July 21, 2026 19:35
@isaacs
isaacs requested review from JPeer264 and andreiborza and removed request for a team July 21, 2026 19:35
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-express branch from 6d5b8ae to 6237ccf Compare July 21, 2026 19:36
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-lrumemoizer branch from 5da649b to ad82a2a Compare July 21, 2026 19:36
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-express branch from 6237ccf to 4c157ad Compare July 21, 2026 19:49
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-lrumemoizer branch from ad82a2a to ba29b3a Compare July 21, 2026 19:49
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-express branch from 4c157ad to 86ed574 Compare July 21, 2026 21:43
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-lrumemoizer branch from ba29b3a to a2c00be Compare July 21, 2026 21:43
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-express branch from 86ed574 to 55f7640 Compare July 22, 2026 00:51
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-lrumemoizer branch from a2c00be to e758510 Compare July 22, 2026 00:51

@nicohrubec nicohrubec left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

import { assertEquals } from 'https://deno.land/std@0.212.0/assert/assert_equals.ts';
import { assertExists } from 'https://deno.land/std@0.212.0/assert/assert_exists.ts';

function resetGlobals(): void {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

l: are these helpers the same in all tests? if yes maybe worth extracting out

@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-express branch from 55f7640 to 8d4883f Compare July 22, 2026 14:42
@isaacs
isaacs requested review from a team as code owners July 22, 2026 14:42
@isaacs
isaacs requested review from chargome, msonnb and mydea and removed request for a team July 22, 2026 14:42
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-lrumemoizer branch 2 times, most recently from a100fe7 to 9d37f38 Compare July 22, 2026 22:02
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-express branch from 8d4883f to 5b72b0b Compare July 22, 2026 22:02
@github-actions

github-actions Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

size-limit report 📦

⚠️ Warning: Base artifact is not the latest one, because the latest workflow run is not done yet. This may lead to incorrect results. Try to re-run all tests to get up to date results.

Path Size % Change Change
@sentry/browser 27.79 kB - -
@sentry/browser - with treeshaking flags 26.23 kB - -
@sentry/browser (incl. Tracing) 46.31 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 48.06 kB - -
@sentry/browser (incl. Tracing, Profiling) 51.12 kB - -
@sentry/browser (incl. Tracing, Replay) 85.59 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 75.23 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 90.29 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 102.97 kB - -
@sentry/browser (incl. Feedback) 44.96 kB - -
@sentry/browser (incl. sendFeedback) 32.59 kB - -
@sentry/browser (incl. FeedbackAsync) 37.64 kB - -
@sentry/browser (incl. Metrics) 28.88 kB - -
@sentry/browser (incl. Logs) 29.11 kB - -
@sentry/browser (incl. Metrics & Logs) 29.8 kB - -
@sentry/react 29.59 kB - -
@sentry/react (incl. Tracing) 48.6 kB - -
@sentry/vue 33.22 kB - -
@sentry/vue (incl. Tracing) 48.28 kB - -
@sentry/svelte 27.81 kB - -
CDN Bundle 30.11 kB - -
CDN Bundle (incl. Tracing) 48.14 kB - -
CDN Bundle (incl. Logs, Metrics) 31.69 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 49.47 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 70.95 kB - -
CDN Bundle (incl. Tracing, Replay) 85.72 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 87.01 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 91.49 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 92.78 kB - -
CDN Bundle - uncompressed 89.77 kB - -
CDN Bundle (incl. Tracing) - uncompressed 144.84 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 94.48 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 148.82 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 219.24 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 264.08 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 268.04 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 277.78 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 281.74 kB - -
@sentry/nextjs (client) 51.13 kB - -
@sentry/sveltekit (client) 46.75 kB - -
@sentry/core/server 79.92 kB - -
@sentry/core/browser 51.9 kB - -
@sentry/node 124.4 kB - -
@sentry/node (incl. diagnostics channel injection) 149.83 kB -0.01% -2 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 70.03 kB - -
@sentry/node - without tracing 74.66 kB +0.01% +1 B 🔺
@sentry/aws-serverless 84.13 kB +0.01% +2 B 🔺
@sentry/cloudflare (withSentry) - minified 196.61 kB - -
@sentry/cloudflare (withSentry) 482.97 kB - -

View base workflow run

@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-express branch from 5b72b0b to 9f9dca3 Compare July 23, 2026 14:29
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-lrumemoizer branch from 9d37f38 to cee6ad4 Compare July 23, 2026 14:29
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-express branch from 9f9dca3 to b2b7f0f Compare July 23, 2026 18:10
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-lrumemoizer branch 2 times, most recently from 14acde5 to 1414310 Compare July 23, 2026 20:46
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-express branch from b2b7f0f to 632cfe9 Compare July 23, 2026 20:46
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-express branch from 632cfe9 to d79eaf2 Compare July 23, 2026 21:19
@isaacs
isaacs force-pushed the isaacs/deno-orchestrion-integrations-lrumemoizer branch from 1414310 to 62951af Compare July 23, 2026 21:19
Comment on lines +65 to +74
Deno.test('express instrumentation: orchestrion:express:handle channel produces a nested middleware span', async () => {
resetGlobals();
const sink = transactionSink();
init({
dsn: 'https://username@domain/123',
tracesSampleRate: 1,
beforeSendTransaction: sink.beforeSendTransaction,
});

const channel = tracingChannel('orchestrion:express:handle');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: The test suite does not reset the global installedIntegrations array between tests, causing test isolation failures where integrations are not re-initialized correctly.
Severity: LOW

Suggested Fix

In the test setup file, add installedIntegrations.splice(0, installedIntegrations.length) to the test's beforeEach or equivalent setup function. This will clear the array and ensure each test runs with a clean slate, matching the pattern used in other integration tests.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent. Verify if this is a real issue. If it is, propose a fix; if not, explain why it's
not valid.

Location: dev-packages/deno-integration-tests/suites/orchestrion-express/test.ts#L65-L74

Potential issue: A test isolation issue exists where global state is not properly reset
between test runs. Specifically, the `installedIntegrations` global array is not
cleared. This prevents Sentry integrations, such as the Express integration, from being
set up again in subsequent tests because their `setupOnce()` method is skipped. This can
lead to fragile tests that implicitly rely on state from previous tests, rather than
running in a clean, isolated environment. While a module-level `_isInstrumented` flag
also prevents re-instrumentation, the primary issue is the lack of global state reset in
the test suite's setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants